package com.ruoyi.carton.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.carton.domain.Orders;
import com.ruoyi.carton.domain.vo.OrdersAndBoxVO;
import com.ruoyi.carton.domain.vo.OrdersDetailVO;
import com.ruoyi.carton.domain.vo.OrdersQuery;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
* @author 时空
* @description 针对表【orders(订单主表)】的数据库操作Service
* @createDate 2025-06-28 13:26:44
*/
public interface OrdersService extends IService<Orders> {

    List<Orders> selectOrdersList(Orders orders);

    List<OrdersDetailVO> selectOrdersDetailList(OrdersQuery query);

    int updateStatusById(String id);

    void deleteOrderAndChildren(String id);


    @Transactional(rollbackFor = Exception.class)
    void addOrderAndBox(OrdersAndBoxVO vo);

    @Transactional(rollbackFor = Exception.class)
    void UpdateOrderAndBox(OrdersAndBoxVO vo);
}
